package com.example.hrandroidapp.adapter;

import com.example.hrandroidapp.fragment.LeavePendingFragment;
import com.example.hrandroidapp.fragment.LeaveRejectFragment;
import com.example.hrandroidapp.fragment.LeaveApproveFragment;
import com.example.hrandroidapp.fragment.MyLeaveFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class TabsPagerAdapter extends FragmentPagerAdapter {

	public TabsPagerAdapter(FragmentManager fm) {
		super(fm);
	}
	
	@Override
	public Fragment getItem(int index) {
		switch(index) {
		case 0: 
			return new LeavePendingFragment();
			
		case 1:
			return new LeaveApproveFragment();
			
		case 2:
			return new LeaveRejectFragment();
			
		case 3:
			return new MyLeaveFragment();
		}
		return null;
	}

	@Override
	public int getCount() {
		return 4;
	}

}
